﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using YJKStairs.Manage;

namespace YJKStairs.DataInfos
{
	public class Escalator : BaseCommonStairs
	{
		public Escalator()
		{
			base.m_sName = "自动扶梯";
		}

		public Escalator(StairsCreator Creator)
		{
			base.m_sName = "自动扶梯";
			this.m_StairsCreator = Creator;
		}

		public override void DrawStairs()
		{
			EscalatorCreator escalatorCreator = this.m_StairsCreator as EscalatorCreator;
			if (escalatorCreator != null)
			{
				escalatorCreator.CreateEscalator(this);
			}
		}

		public double m_dStairsWidth { get; set; }

		public double m_dRunWidth { get; set; }

		public double m_dRunLength { get; set; }

		public double m_dRunDepth { get; set; }

		public XYZ m_TransVector { get; set; }

		public XYZ m_ptInsert { get; set; }

		public double m_dBottomElevation { get; set; }

		public double m_dTopElevation { get; set; }

		public double m_dStairsHigh { get; set; }

		public double m_dStairsOffset { get; set; }

		public YJKStairs.DataInfos.FloorType m_FloorType { get; set; }

		public UpStairsType m_UpStairsType { get; set; }

		public Escalator.PlaceType m_PlaceType { get; set; }

		public Escalator.PosInsertType m_PosInsertType { get; set; }

		public int m_nIndexInsertPos { get; set; }

		public int m_nRunCount { get; set; }

		public double m_dStairsDis { get; set; }

		public double m_dFrontDepth { get; set; }

		public double m_dStartDepth { get; set; }

		public double m_dTreadDepth { get; set; }

		public double m_dHSpan { get; set; }

		public double m_dRotateAngle { get; set; }

		public double m_dInclienAngle { get; set; }

		public bool m_bAsRamp { get; set; }

		public bool m_bLftRhtTurn { get; set; }

		public bool m_bUpDownTurn { get; set; }

		public string m_sFamilyName { get; set; }

		public string m_sSymbolName { get; set; }

		public double m_dRailHeight { get; set; }

		public double m_dBtmPitLength { get; set; }

		public double m_dBtmPitDepth { get; set; }

		public double m_dBtmPitExturn { get; set; }

		public double m_dTopPitLength { get; set; }

		public double m_dTopPitDepth { get; set; }

		public double m_dTopPitExturn { get; set; }

		public string m_sRvtVersion { get; set; }

		public string m_sNumPreFix { get; set; }

		public int m_nNumSerial { get; set; }

		public string m_sNumSubFix { get; set; }

		private StairsCreator m_StairsCreator;

		public LineRunData m_LeftRunData = new LineRunData();

		public List<CurveInfo> m_LeftRunCurves = new List<CurveInfo>();

		public LineRunData m_RightRunData = new LineRunData();

		public List<CurveInfo> m_RightRunCurves = new List<CurveInfo>();

		public LineRunData m_MidOneRunData = new LineRunData();

		public List<CurveInfo> m_MidOneCurves = new List<CurveInfo>();

		public LineRunData m_MidTwoRunData = new LineRunData();

		public List<CurveInfo> m_MidTwoCurves = new List<CurveInfo>();

		public List<CurveInfo> m_InsertCurves = new List<CurveInfo>();

		public List<Escalator.TransformTag> m_arTurnTag = new List<Escalator.TransformTag>();

		public List<Escalator.Direction> m_arDirection = new List<Escalator.Direction>();

		public List<Escalator.NoteData> m_arNoteInfo = new List<Escalator.NoteData>();

		public enum PosInsertType
		{
			PIT_LftBtm,
			PIT_LftTop,
			PIT_RhtBtm,
			PIT_RhtTop
		}

		public enum PlaceType
		{
			PT_ParallelSameDirect,
			PT_ParallelReverseDirect,
			PT_CrossingSameDirect,
			PT_CrossingReverseDirect
		}

		public class TransformTag
		{
			public TransformTag(XYZ ptCenter, bool bIsTurn = false)
			{
				this.m_bTurn = bIsTurn;
				this.m_ptCenter = ptCenter;
			}

			public bool m_bTurn;

			public XYZ m_ptCenter;
		}

		public class Direction
		{
			public Direction(int nIndex, bool bIsReverse = false)
			{
				this.m_nRunIndex = nIndex;
				this.m_bIsReverse = bIsReverse;
			}

			public int m_nRunIndex;

			public bool m_bIsReverse;
		}

		public class DrawPitData
		{
			public DrawPitData(int nSpace, Escalator.Direction Dir)
			{
				this.m_Direction = Dir;
				this.m_nSpace = nSpace;
			}

			public Escalator.Direction m_Direction;

			public int m_nSpace;
		}

		public class NoteData
		{
			public NoteData(XYZ ptS, XYZ ptE, string sText, bool bIsHori = false)
			{
				this.m_ptStart = ptS;
				this.m_ptEnd = ptE;
				this.m_bIsHori = bIsHori;
				this.m_sText = sText;
			}

			public XYZ m_ptStart;

			public XYZ m_ptEnd;

			public bool m_bIsHori;

			public string m_sText;
		}
	}
}
